*** Settings ***
Documentation    超级代驾微信小程序
Library  ../SuperChauffeuring/SuperChauffeuring.py
Library  Collections
Library  RequestsLibrary
Resource  ../SuperChauffeuring/Variables/params.txt

*** Variables ***
${exp_color}    ('17', '187', '85')
*** Test Cases ***
0001
    [Tags]  小贴士
    CREATE SESSION    Tips  ${domains}  verify=True
    ${headers}  CREATE DICTIONARY    Content-Type=application/json   Charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST    Tips     /webapi/weapp/main/home/tips     params=${CommonParams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY     ${resp}    status
    ${msg}  GET FROM DICTIONARY     ${resp}      msg
    ${tips}     GET FROM DICTIONARY     ${resp}[result]     tips
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD NOT BE EMPTY  ${tips}


0002
    [Tags]  【首页/基础参数】
    CREATE SESSION  MainProfile    ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST     MainProfile     /webapi/weapp/main/profile  params=${Commonparams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY    ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${locationBtn}     GET FROM DICTIONARY  ${resp}[result][buttons]     locationBtn
    ${createOrderBtn}   GET FROM DICTIONARY  ${resp}[result][buttons]   createOrderBtn
    ${plazaMinBalance}  GET FROM DICTIONARY  ${resp}[result]    plazaMinBalance
    ${locationReminder}     GET FROM DICTIONARY  ${resp}[result]    locationReminder
    ${introUrl}     GET FROM DICTIONARY  ${resp}[result]    introUrl
    ${createUrl}    GET FROM DICTIONARY  ${resp}[result]    createUrl
    ${webank}       GET FROM DICTIONARY  ${resp}[result][webank]    details
    ${pagetitle}    GET FROM DICTIONARY  ${resp}[result][insurance]     pageTitle
    ${noAuditHintTitle}     GET FROM DICTIONARY  ${resp}[result][insurance][noAuditHint]    title
    ${noAuditHintContent}   GET FROM DICTIONARY  ${resp}[result][insurance][noAuditHint]    content
    ${auditHint}    GET FROM DICTIONARY  ${resp}[result][insurance]     auditHint
    ${insuranceDetails}     GET FROM DICTIONARY  ${resp}[result][insurance]     details
    ${reportImage}  GET FROM DICTIONARY  ${resp}[result][insurance][report]     image
    ${reportButtons}    GET FROM DICTIONARY  ${resp}[result][insurance][report]     buttons
    ${reportButton1}    GET FROM DICTIONARY  ${reportButtons}[0]    title
    ${reportButton1Value}    GET FROM DICTIONARY  ${reportButtons}[0]    value
    ${reportButton2}    GET FROM DICTIONARY  ${reportButtons}[1]    title
    ${reportButton2Value}    GET FROM DICTIONARY  ${reportButtons}[1]    value
    ${anchor}   GET FROM DICTIONARY  ${resp}[result][insurance][report]     anchor
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${locationBtn}   下一步
    SHOULD BE EQUAL AS STRINGS  ${createOrderBtn}   确认车况，开始行程
    SHOULD BE EQUAL AS STRINGS  ${plazaMinBalance}  50
    SHOULD BE EQUAL AS STRINGS  ${locationReminder}     设置一下，可以自由看微信，打电话，不影响跳表
    SHOULD BE EQUAL AS STRINGS  ${introUrl}     http://image-ant.sixapp.cn/heyu-superdriver/keep/supercar-intro2.png?t=2
    SHOULD BE EQUAL AS STRINGS  ${createUrl}    http://image-ant.sixapp.cn/heyu-superdriver/intro-create-img.png
    LENGTH SHOULD BE  ${webank}     6
    SHOULD BE EQUAL AS STRINGS  ${pageTitle}    会员权益
    SHOULD BE EQUAL AS STRINGS  ${noAuditHintTitle}     享受会员权益，需认证身份
    SHOULD BE EQUAL AS STRINGS  ${noAuditHintContent}   请提前进行认证，以免代驾服务被临时中断
    SHOULD BE EQUAL AS STRINGS  ${auditHint}    您已通过认证，每次行程前可选择全程保障
    LENGTH SHOULD BE  ${insuranceDetails}   5
    SHOULD BE EQUAL AS STRINGS  ${reportImage}      http://image-ant.sixapp.cn/heyu-superdriver/insure/chuxian-process3.png?t=1
    SHOULD BE EQUAL AS STRINGS  ${reportButton1}    拨打 95519，代驾险报案
    SHOULD BE EQUAL AS STRINGS  ${reportButton1Value}   95519
    SHOULD BE EQUAL AS STRINGS  ${reportButton2}    联系超级代驾客服
    SHOULD BE EQUAL AS STRINGS  ${reportButton2Value}   057126206536
    SHOULD BE EQUAL AS STRINGS  ${anchor}       中国人寿代驾责任险说明





0003
    [Tags]  主页场景
    CREATE SESSION  EnterScene  ${domains}   verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST     EnterScene     /webapi/weapp/main/home  params=${Commonparams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY    ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${result}   GET FROM DICTIONARY  ${resp}    result
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD NOT BE EMPTY  ${result}

0004
    [Tags]  用户状态check
    CREATE SESSION  CheckEnterScenne    ${domains}  verify=True
    ${headers}  CREATE DICTIONARY   Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  CheckEnterScenne   /webapi/weapp/user/info/check   params=${CommonParams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${login}    GET FROM DICTIONARY  ${resp}[result]    login
    ${wxAuth}   GET FROM DICTIONARY  ${resp}[result]    wxAuth
    ${certificate}  GET FROM DICTIONARY  ${resp}[result]    certificate
    ${driverLicense}    GET FROM DICTIONARY  ${resp}[result]    driverLicense
    ${phoneAuth}    GET FROM DICTIONARY  ${resp}[result]    phoneAuth
    ${userAuth}     GET FROM DICTIONARY  ${resp}[result]    userAuth
    ${isTest}   GET FROM DICTIONARY  ${resp}[result]    isTest
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${login}    True
    SHOULD BE EQUAL AS STRINGS  ${wxAuth}   True
    SHOULD BE EQUAL AS STRINGS  ${certificate}  audit
    SHOULD BE EQUAL AS STRINGS  ${driverLicense}    audit
    SHOULD BE EQUAL AS STRINGS  ${phoneAuth}    True
    SHOULD BE EQUAL AS STRINGS  ${userAuth}     True
    SHOULD BE EQUAL AS STRINGS  ${isTest}   1

0005
    [Tags]  详细用户信息
    CREATE SESSION  DetailEnterScene    ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  DetailEnterScene    /webapi/weapp/user/info/detail   params=${CommonParams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${phone}    GET FROM DICTIONARY  ${resp}[result]    phonex
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${phone}    18571015163

0006
    [Tags]  小地图设置
    CREATE SESSION  MiniMapSettings     ${domains}  verify=True
    ${headers}  CREATE DICTIONARY   Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  MiniMapSettings    /webapi/weapp/user/miniapp/settings     params=${commonparams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success

0007
    [Tags]  【分享/信息初始化】
    CREATE SESSION  ShareInit   ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST     ShareInit   /webapi/weapp/share/init    params=${Commonparams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS      ${resps.status_code}         200
    ${resp}     TO JSON  ${resps.content.decode()}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${app}  GET FROM DICTIONARY  ${resp}[result]    app
    ${shareText}    GET FROM DICTIONARY  ${resp}[result]     shareText
    ${inviteCode}   GET FROM DICTIONARY  ${resp}[result]     inviteCode
    ${shareLogo}    GET FROM DICTIONARY  ${resp}[result]     shareLogo
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${app}  a_spcar
    SHOULD BE EQUAL AS STRINGS  ${shareText}    向你推荐一款免费的代驾神器
    SHOULD BE EQUAL AS STRINGS  ${shareLogo}    http://image-ant.sixapp.cn/heyu-superdriver/supercar-share-card.png
    SHOULD BE EQUAL AS STRINGS  ${inviteCode}   S4QA0R89

#需要做订单销毁操作
0008
    [Tags]  【订单/当前订单】
    CREATE SESSION  CurrentOrderInfo    ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  CurrentOrderInfo   /webapi/weapp/order/info/current    params=${Commonparams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY     ${resp}     status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success

#######################################################

00005
    [Tags]  【订阅消息/获取订阅消息模板列表】
    CREATE SESSION  MessageTemplateList     ${domains}  verify=True
    ${headers}  CREATE DICTIONARY      Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  MessageTemplateList    /webapi/public/message/template/subscribe   params=${CommonParams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success

#未处理完
00006
    [Tags]  【订阅消息/订阅消息模板提交】
    CREATE SESSION      MessageTemplateSubscribe    ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  MessageTemplateSubscribe   /webapi/public/message/template/subscribe   params=${CommonParams}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON     ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success


00007
    [Tags]  【关注公众号/根据不同场景获取关注公众号h5 url】
    CREATE SESSION  OffcialAccountQuery     ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${data}    CREATE DICTIONARY  app=a_spcar
    ${resps}    GET REQUEST  OffcialAccountQuery    /webapi/public/offiaccount/url/query    params=${data}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${url}  GET FROM DICTIONARY  ${resp}[result]    url
    SHOULD BE EQUAL AS STRINGS  ${status}  1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${url}  	http://mp.weixin.qq.com/s?__biz=Mzg4MzUzODc3MA==&mid=100002369&idx=1&sn=421d93b769cc92f0a24013c3a705c4a4&chksm=4f44a47c78332d6a20f1e9b557b709803dafad3ed038efd7baf65a1f50734e1166e652b95e42#rd

00014
    [Tags]  【计费模板/模板详情】
    CREATE SESSION  ServiceDetail   ${domains}      verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY  tempId=public.12228
    ${resps}    GET REQUEST  ServiceDetail  /webapi/weapp/feetemp/service/detail    params=${data}     headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${version}  GET FROM DICTIONARY  ${resp}[result]    version
    ${name}     GET FROM DICTIONARY  ${resp}[result]    name
    ${isDefault}    GET FROM DICTIONARY  ${resp}[result]    isDefault
    ${start}    GET FROM DICTIONARY  ${resp}[result]    start
    ${over}     GET FROM DICTIONARY  ${resp}[result]    over
    ${back}     GET FROM DICTIONARY  ${resp}[result]    back
    ${wait}     GET FROM DICTIONARY  ${resp}[result]    wait
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${version}  D003
    SHOULD BE EQUAL AS STRINGS  ${name}     通用计费模板
    SHOULD BE EQUAL AS STRINGS  ${isDefault}    False
    LENGTH SHOULD BE  ${start}      3
    DICTIONARY SHOULD CONTAIN KEY  ${over}  overUnits
    DICTIONARY SHOULD CONTAIN KEY  ${over}  overPrice
    DICTIONARY SHOULD CONTAIN KEY  ${back}  freeDistance
    DICTIONARY SHOULD CONTAIN KEY  ${back}  feeUnits
    DICTIONARY SHOULD CONTAIN KEY  ${back}  feePrice
    DICTIONARY SHOULD CONTAIN KEY  ${wait}  freeMin
    DICTIONARY SHOULD CONTAIN KEY  ${wait}  feeUnits
    DICTIONARY SHOULD CONTAIN KEY  ${wait}  feePrice


00015
    [Tags]  【计费模板/模板展示信息】
    CREATE SESSION  ServiceInfo     ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY  app=a_spcar  feeTempId=public.12228  p=${p}
    ${resps}    GET REQUEST  ServiceInfo    /webapi/weapp/feetemp/service/info  params=${data}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${tempId}   GET FROM DICTIONARY  ${resp}[result]    tempId
    ${isDefault}    GET FROM DICTIONARY  ${resp}[result]    isDefault
    ${tempTitle}    GET FROM DICTIONARY  ${resp}[result]    tempTitle
    ${isStandard}   GET FROM DICTIONARY  ${resp}[result]    isStandard
    ${items}    GET FROM DICTIONARY  ${resp}[result]    items
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}      success
    SHOULD BE EQUAL AS STRINGS  ${tempId}   public.12228
    SHOULD BE EQUAL AS STRINGS  ${isDefault}    False
    SHOULD BE EQUAL AS STRINGS  ${tempTitle}    杭州市E模板
    SHOULD BE EQUAL AS STRINGS  ${isStandard}   1
    LENGTH SHOULD BE  ${items}  4


00016
    [Tags]  【WEAPP/计费模板/模板列表】
    CREATE SESSION  ServiceList     ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY  app=a_spcar  p=${p}
    ${resps}    GET REQUEST  ServiceList    /webapi/weapp/feetemp/service/list  headers=${headers}      params=${data}
    LOG TO CONSOLE  ${resps.content}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON     ${resps.content}
    ${status}   GET FROM DICTIONARY     ${resp}  status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${canAdd}   GET FROM DICTIONARY  ${resp}[result][feeTempList]   canAdd
    ${default}  GET FROM DICTIONARY  ${resp}[result][feeTempList]   default
    ${number}   GET FROM DICTIONARY  ${resp}[result][feeTempList]   number
    ${rows}     GET FROM DICTIONARY  ${resp}[result][feeTempList]   rows
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}      success
    SHOULD BE EQUAL AS STRINGS  ${canAdd}   True
    SHOULD BE EQUAL AS STRINGS  ${default}  public.12228
    SHOULD BE EQUAL AS STRINGS  ${number}   2
    LENGTH SHOULD BE  ${rows}   3


00017
    [Tags]  【计费模板/模板删除】--通用模板不能删除
    CREATE SESSION  DeletePublicFeetemp     ${domains}      verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY  tempId=public.9999
    ${resps}    GET REQUEST  DeletePublicFeetemp        /webapi/weapp/feetemp/service/remove    params=${data}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${message}  GET FROM DICTIONARY  ${resp}[result]    message
    ${title}    GET FROM DICTIONARY  ${resp}[result]    title
    ${status}   GET FROM DICTIONARY  ${resp}    status
    SHOULD BE EQUAL AS STRINGS  ${msg}      通用模板不能执行删除！
    SHOULD BE EQUAL AS STRINGS  ${message}  通用模板不能执行删除！
    SHOULD BE EQUAL AS STRINGS  ${title}    温馨提示
    SHOULD BE EQUAL AS STRINGS  ${status}   900


00018
    [Tags]  【计费模板/模板信息提交】
    CREATE SESSION  ServiceSubmit   ${domains}      verify=True
    ${headers}  CREATE DICTIONARY   Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
#    ${data}     CREATE DICTIONARY



00019
    [Tags]  挡板阶段
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}


00020_1
    [Tags]  【系统资源获取】--biztype=app.guide.audit
    CREATE SESSION  MainMaterial    ${domains}      verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY   app=a_spcar     biztype=app.guide.audit
    ${resps}    GET REQUEST  MainMaterial   /webapi/weapp/main/material    params=${data}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${biztype}  GET FROM DICTIONARY  ${resp}[result]    biztype
    ${ver}  GET FROM DICTIONARY  ${resp}[result][imageList]     ver
    ${rows}     GET FROM DICTIONARY  ${resp}[result][imageList]     rows
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${biztype}  app.guide.audit
    SHOULD BE EQUAL AS STRINGS  ${ver}  1.0
    SHOULD BE EQUAL AS STRINGS  ${rows}     ['http://image-sandbox.sixapp.cn/antpilot/app/certificate_tips@01.png']

00020_2
    [Tags]  【系统资源获取】--biztype=app.guide.recharge
    CREATE SESSION  MainMaterial    ${domains}      verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY   app=a_spcar     biztype=app.guide.recharge
    ${resps}    GET REQUEST  MainMaterial   /webapi/weapp/main/material    params=${data}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${biztype}  GET FROM DICTIONARY  ${resp}[result]    biztype
    ${ver}  GET FROM DICTIONARY  ${resp}[result][imageList]     ver
    ${rows}     GET FROM DICTIONARY  ${resp}[result][imageList]     rows
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${biztype}  app.guide.recharge
    SHOULD BE EQUAL AS STRINGS  ${ver}  1.0
    SHOULD BE EQUAL AS STRINGS  ${rows}     ['http://image-sandbox.sixapp.cn/antpilot/app/app.audit.1_01.png']

00020_3
    [Tags]  【系统资源获取】--biztype=app.guide.qrcode
    CREATE SESSION  MainMaterial    ${domains}      verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY   app=a_spcar     biztype=app.guide.qrcode
    ${resps}    GET REQUEST  MainMaterial   /webapi/weapp/main/material    params=${data}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${biztype}  GET FROM DICTIONARY  ${resp}[result]    biztype
    ${ver}  GET FROM DICTIONARY  ${resp}[result][imageList]     ver
    ${rows}     GET FROM DICTIONARY  ${resp}[result][imageList]     rows
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${biztype}  app.guide.qrcode
    SHOULD BE EQUAL AS STRINGS  ${ver}  1.0
    SHOULD BE EQUAL AS STRINGS  ${rows}     ['http://image-ant.sixapp.cn/app/app.audit.2_02.png']


00021
    [Tags]  【首页/基础参数】
    CREATE SESSION  MainProfile     ${domains}      verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  MainProfile    /webapi/weapp/main/profile  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${locationBtn}   GET FROM DICTIONARY  ${resp}[result][buttons]  locationBtn
    ${createOrderBtn}   GET FROM DICTIONARY  ${resp}[result][buttons]   createOrderBtn
    ${introUrl}     GET FROM DICTIONARY  ${resp}[result]    introUrl
    ${createUrl}    GET FROM DICTIONARY  ${resp}[result]    createUrl
    ${pageTitle}    GET FROM DICTIONARY  ${resp}[result][insurance]     pageTitle
    ${title}    GET FROM DICTIONARY  ${resp}[result][insurance][noAuditHint]    title
    ${content}  GET FROM DICTIONARY  ${resp}[result][insurance][noAuditHint]    content
    ${auditHint}    GET FROM DICTIONARY  ${resp}[result][insurance]    auditHint
    ${details}  GET FROM DICTIONARY  ${resp}[result][insurance]    details
#    LOG TO CONSOLE  ${details}
    ${image}    GET FROM DICTIONARY  ${resp}[result][insurance][report]     image
    ${buttons}  GET FROM DICTIONARY  ${resp}[result][insurance][report]     buttons
    ${button1}  GET FROM DICTIONARY  ${buttons}[0]      title
    ${button1Value}     GET FROM DICTIONARY  ${buttons}[0]      value
    ${button2}  GET FROM DICTIONARY  ${buttons}[1]      title
    ${button2Value}     GET FROM DICTIONARY  ${buttons}[1]  value
    ${anchor}       GET FROM DICTIONARY  ${resp}[result][insurance][report]     anchor
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${locationBtn}  下一步
    SHOULD BE EQUAL AS STRINGS  ${createOrderBtn}   确认车况，开始行程
    SHOULD BE EQUAL AS STRINGS  ${introUrl}     http://image-ant.sixapp.cn/heyu-superdriver/keep/supercar-intro2.png?t=2
    SHOULD BE EQUAL AS STRINGS  ${createUrl}    http://image-ant.sixapp.cn/heyu-superdriver/intro-create-img.png
    SHOULD BE EQUAL AS STRINGS  ${pageTitle}    会员权益
    SHOULD BE EQUAL AS STRINGS  ${title}    享受会员权益，需认证身份
    SHOULD BE EQUAL AS STRINGS  ${content}  请提前进行认证，以免代驾服务被临时中断
    SHOULD BE EQUAL AS STRINGS  ${auditHint}    您已通过认证，每次行程前可选择全程保障
    LENGTH SHOULD BE  ${details}    5
    SHOULD BE EQUAL AS STRINGS  ${image}    http://image-ant.sixapp.cn/heyu-superdriver/insure/chuxian-process3.png?t=1
    SHOULD BE EQUAL AS STRINGS  ${button1}  拨打 95519，代驾险报案
    SHOULD BE EQUAL AS STRINGS  ${button1Value}    95519
    SHOULD BE EQUAL AS STRINGS  ${button2}  联系超级代驾客服
    SHOULD BE EQUAL AS STRINGS  ${button2Value}     057126206536
    SHOULD BE EQUAL AS STRINGS  ${anchor}   中国人寿代驾责任险说明


00022
    [Tags]  【用户端信息上报】
    CREATE SESSION  MainReport  ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY  location=30.287979,119.999552
    ${resps}    GET REQUEST     MainReport  /webapi/weapp/main/report   params=${data}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${result}   GET FROM DICTIONARY  ${resp}    result
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    LENGTH SHOULD BE  ${result}     0


00023
    [Tags]  【订单/行程/取消服务】--挡板阶段
    LOG TO CONSOLE  挡板阶段 pass


00024
    [Tags]  【订单/行程/完成服务】
    CREATE SESSION  OrderActionFinish   ${domains}      verify=True


00025
    [Tags]  【订单/行程/就位】
    CREATE SESSION  OrderActionReady   ${domains}      verify=True


00026
    [Tags]  接单订单/接单订单开始行程】
    CREATE SESSION  OrderActionStart   ${domains}      verify=True


00027
    [Tags]  【订单/行程/停车等候】
    CREATE SESSION  OrderActionWait   ${domains}      verify=True


00028
    [Tags]  【抢单/取消抢单--挡板阶段
    CREATE SESSION  OrderApplyCancel    ${domains}      verify=True

00029
    [Tags]  【抢单/查看抢单详情】
    CREATE SESSION  OrderApplyDetail    ${domains}      verify=True

00030
    [Tags]  【抢单/抢单初始化】
    CREATE SESSION  OrderApplyInit    ${domains}        verify=True

00031
    [Tags]  【抢单/抢单打开】
    CREATE SESSION  OrderApplyOpen  ${domains}      verify=True


00032
    [Tags]  【抢单/订单查询】--挡板阶段
    CREATE SESSION  OrderApplyQuery  ${domains}      verify=True


00033
    [Tags]  【抢单/抢单提交】
    CREATE SESSION  OrderApplySubmit    ${domains}  verify=True

00034
    [Tags]  【用户/司机电子工牌接单】--挡板阶段
    CREATE SESSION  BadgeDriverAccept   ${domains}  verify=True


00035
    [Tags]  【用户/获取司机电子工牌当前接单订单】--挡板阶段
    CREATE SESSION  DriverCurrentOrder  ${domains}  verify=True


00036
    [Tags]  【用户/司机电子工牌拒绝接单】--挡板阶段
    CREATE SESSION  BadgeDriverReject   ${domains}  verify=True


00037
    [Tags]  【订单/初始化创建订单】--挡板阶段
    CREATE SESSION  OrderCreate     ${domains}  verify=True


00038
    [Tags]  【派单/抢单的用户列表】
    CREATE SESSION  OrderDeliverApplylist   ${domains}  verify=True


00039
    [Tags]  【派单/分配订单】
    CREATE SESSION  OrderDeliverApplylist   ${domains}  verify=True

00040
    [Tags]  【派单/取消派单】
    CREATE SESSION  OrderDeliverCancel  ${domains}  verify=True

00041
    [Tags]  【派单/查看派单详情】
    CREATE SESSION  OrderDeliverDetail  ${domains}  verify=True

00042
    [Tags]  【拍单/派单初始化】
    CREATE SESSION  OrderDeliverInit    ${domains}  verify=True

00043
    [Tags]  【派单/派单提交】
    CREATE SESSION  OrderDeliverSubmit  ${domains}  verify=True

00044
    [Tags]  【派单/标签查询】
    CREATE SESSION  OrderDeliverTags    ${domains}  verify=True

00045
    [Tags]  【派单/标签更新】
    CREATE SESSION  OrderDeliverTagsUpdate  ${domains}  verify=True

00046
    [Tags]  【订单/费用计算(估算)】
    CREATE SESSION  OrderFeeCalc    ${domains}  verify=True

00047
    [Tags]  【订单/费用确认INIT】
    CREATE SESSION  OrderFeeConfirmInit     ${domains}      verify=True

00048
    [Tags]  【订单/费用确认】
    CREATE SESSION  OrderFeeConfirmSubmit   ${domains}  verify=True

00049
    [Tags]  【APP/费用明细】
    CREATE SESSION  OrderFeeDetail  ${domains}  verify=True

00050
    [Tags]  【订单/订单服务数据修正】
    CREATE SESSION  OrderInfoCorrect    ${domains}  verify=True

#当前是否有订单有多种情况
00051
    [Tags]  【订单/当前订单】
    CREATE SESSION  OrderInfoCurrent    ${domains}  verify=True
    ${headers}  CREATE DICTIONARY  Content-Type=application/json   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  OrderInfoCurrent   /webapi/weapp/order/info/current    headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON     ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${result}   GET FROM DICTIONARY  ${resp}    result
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
#    SHOULD BE EQUAL AS STRINGS  ${result}   {}
#    SHOULD NOT BE EMPTY  ${result}


00052
    [Tags]  【订单/详情】
    CREATE SESSION  OrderInfoDetail     ${domains}  verify=True
    ${headers}  CREATE DICTIONARY   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  OrderInfoDetail    /webapi/weapp/order/info/detail     headers=${headers}

00053
    [Tags]  【订单/初始化】
    CREATE SESSION  OrderInfoInit   ${domains}  verify=True
    ${headers}  CREATE DICTIONARY   charset=utf-8   Cookie=${Cookie}
    ${resps}    GET REQUEST  OrderInfoInit  /webapi/weapp/order/info/init   headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON  ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${rows}     GET FROM DICTIONARY     ${resp}[result][checkList]     rows
    ${id}   GET FROM DICTIONARY  ${rows}[0]   id
    ${title}    GET FROM DICTIONARY  ${rows}[0]   title
    ${checkedObj}   GET FROM DICTIONARY  ${rows}[0]     checkedObj
    ${checkedObj_title}     GET FROM DICTIONARY  ${checkedObj}      title
    ${color}    GET FROM DICTIONARY  ${checkedObj}  color
    ${color_rgb}    Color  ${color}
    ${params}     GET FROM DICTIONARY  ${rows}[0]   params
    ${params_title}     GET FROM DICTIONARY  ${params}  title
    ${params_url}   GET FROM DICTIONARY  ${params}  url
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${id}   chkInsure
    SHOULD BE EQUAL AS STRINGS  ${title}    3.5元可享代驾司机全程保障
    SHOULD BE EQUAL AS STRINGS  ${checkedObj_title}     本次行程享代驾司机全程保障
    SHOULD BE EQUAL AS STRINGS  ${color_rgb}    ${exp_color}
    SHOULD BE EQUAL AS STRINGS  ${params_title}     费用及说明
    SHOULD BE EQUAL AS STRINGS  ${params_url}   /pages/safety/index

00054_1
    [Tags]  【订单/列表--我的代驾单】
    CREATE SESSION  OrderInfoList_service   ${domains}      verify=True
    ${headers}      CREATE DICTIONARY  charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY  p=${p}   app=${app}  pageIndex=0     pageSize=10     orderType=service
    ${resps}    GET REQUEST  OrderInfoList_service  /webapi/weapp/order/info/list   params=${data}      headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON     ${resps.content}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}      GET FROM DICTIONARY  ${resp}    msg
    ${result}   GET FROM DICTIONARY  ${resp}    result
    ${pageIndex}    GET FROM DICTIONARY     ${result}   pageIndex
    ${pageSize}     GET FROM DICTIONARY  ${result}  pageSize
    ${orderList}    GET FROM DICTIONARY  ${result}  orderList
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${pageSize}     10
    SHOULD BE EQUAL AS STRINGS  ${pageIndex}    0
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  orderNo
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  status
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  payStatus
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  createTime
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  timeStart
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  timeFinish
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  timeCancel
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  contactPhone
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  distance
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  duration
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  priceTotal
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  priceTotalDesc
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  hint
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  srcLocation
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  destLocation
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  insure
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  insureDesc






00054_2
    [Tags]  【订单/列表--我的派单】
    CREATE SESSION  OrderInfoList_deliver   ${domains}      verify=True
    ${headers}      CREATE DICTIONARY  charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY  p=${p}   app=${app}  pageIndex=0     pageSize=10     orderType=deliver
    ${resps}    GET REQUEST  OrderInfoList_deliver   /webapi/weapp/order/info/list   params=${data}      headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON     ${resps.content.decode()}
    ${status}   GET FROM DICTIONARY  ${resp}    status
    ${msg}      GET FROM DICTIONARY  ${resp}    msg
    ${result}   GET FROM DICTIONARY  ${resp}    result
    ${pageIndex}    GET FROM DICTIONARY     ${result}   pageIndex
    ${pageSize}     GET FROM DICTIONARY  ${result}  pageSize
    ${orderList}    GET FROM DICTIONARY  ${result}  orderList
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${pageSize}     10
    SHOULD BE EQUAL AS STRINGS  ${pageIndex}    0
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  orderNo
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  status
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  title
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  createTime
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  timeCancel
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  timeApply
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  contactPhone
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  hint
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  srcLocation
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  destLocation
    DICTIONARY SHOULD CONTAIN KEY  ${orderList}[0]  tags


00055
    [Tags]     【订单/费用支付情况】
    CREATE SESSION  OrderInfoPayment    ${domains}      verify=True
    ${headers}  CREATE DICTIONARY  charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY  orderNo=4460045420710596609  app=${app}
    ${resps}    GET REQUEST  OrderInfoPayment   /webapi/weapp/order/info/payment    params=${data}  headers=${headers}
    SHOULD BE EQUAL AS STRINGS  ${resps.status_code}    200
    ${resp}     TO JSON     ${resps.content}
    ${status}   GET FROM DICTIONARY     ${resp}     status
    ${msg}  GET FROM DICTIONARY  ${resp}    msg
    ${result}   GET FROM DICTIONARY  ${resp}    result
    ${orderNo}  GET FROM DICTIONARY  ${result}  orderNo
    ${orderType}    GET FROM DICTIONARY  ${result}  orderType
    ${feeTotal}     GET FROM DICTIONARY  ${result}  feeTotal
    SHOULD BE EQUAL AS STRINGS  ${status}   1
    SHOULD BE EQUAL AS STRINGS  ${msg}  success
    SHOULD BE EQUAL AS STRINGS  ${orderNo}  4460045420710596609
    SHOULD BE EQUAL AS STRINGS  ${orderType}    service
    SHOULD BE EQUAL AS STRINGS  ${feeTotal}     40
    DICTIONARY SHOULD CONTAIN KEY  ${result}    items
    DICTIONARY SHOULD CONTAIN KEY  ${result}    payReminder
    DICTIONARY SHOULD CONTAIN KEY  ${result}    moneyReceiveQrcode


00056
    [Tags]  【订单/移除】--挡板阶段pass
    CREATE SESSION      OrderInfoRemove     ${domains}      verify=True
    ${headers}  CREATE DICTIONARY  charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY   orderNo=11111   confirm=1
    ${resps}    GET REQUEST     OrderInfoRemove     /webapi/weapp/order/info/remove     params=${data}      headers=${headers}


00057
    [Tags]  【自建订单/自建订单提交并开始行程】
    CREATE SESSION      OrderInfoSubmitStart    ${domains}      verify=True
    ${headers}      CREATE DICTIONARY   charset=utf-8   Cookie=${Cookie}
    ${data}     CREATE DICTIONARY       p=${p}      app=${app}      srcLocation=${srcLocation}      destLocation=${destLocation}       feeTempId=public.12228
#    ${resps}    POST REQUEST    OrderInfoSubmitStart        /webapi/weapp/order/info/submitstart        headers=${headers}      json=${data}
#    LOG TO CONSOLE  ${resps.content}




















#0001
#    [Tags]  【我的客户/客户详情】
#    [Documentation]  客户详情，展现头像名称，以及与我（我的团队）相关的订单
#    create session  customerDetail  ${domains}     verify=True
#    ${params}   RequestJson    customerId=XE350B8XN
#    ${cookies}  Cookie  User=0
#    ${data}     to json  ${params}
#    ${headers}     Create Dictionary    Content-Type=application/json   charset=utf-8   Cookie=${cookies}
#    ${resps}    post request     customerDetail     webapi/app/customer/detail     json=${data}       headers=${headers}
#    Should Be Equal As Strings    ${resps.status_code}    200
#    ${resp}     to json  ${resps.content}
#    ${status}   get from dictionary  ${resp}    status
#    ${msg}  get from dictionary  ${resp}    msg
#    ${result}   get from dictionary  ${resp}    result
#    should be equal as strings  ${status}   1
#    should be equal as strings  ${msg}  success
#    should not be empty  ${result}




#*** Keywords ***
#Provided precondition
#    Setup system under test